package com.msmall.base.message;

public class FieldError implements java.io.Serializable{

	private static final long serialVersionUID = 59793966908135369L;

	private String fieldName;

	private String message;
	
	public FieldError(){}
	
	public FieldError(String fieldName, String message){
		this.setFieldName(fieldName);
		this.setMessage(message);
	}
	
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public boolean equals(FieldError obj){
		if(obj == null)
			return false;
		if(this == obj)
			return true;
		try{
			if(this.fieldName.equals(obj.getFieldName()) && this.message.equals(obj.getMessage()))
				return true;
		}catch(Exception e){
			return false;
		}
		return false;
	}
}
